Security-first
Bridge minimizes attack surface by keeping communication local. Private keys remain on-device; Bridge only routes approved messages.
Trezor Bridge is a lightweight, local application that establishes secure communication between your Trezor hardware wallet and web applications. This page is a template and deep reference demonstrating recommended flows, security patterns, developer examples, and user-facing instructions — all in a soft, approachable visual theme.
Bridge minimizes attack surface by keeping communication local. Private keys remain on-device; Bridge only routes approved messages.
Installers and packages are provided for Windows, macOS, and major Linux distributions. A lightweight auto-update option is available for convenience and security.
Local HTTP endpoints and a small SDK allow web apps to detect devices, initiate actions, and receive callbacks for user confirmations.
Bridge components and utilities are designed to be auditable. Follow secure build practices and reproducible artifacts for maximum trust.
fetch('http://127.0.0.1:21325/api/device/list')
.then(r => r.json())
.then(devices => {
console.log('Attached devices:', devices);
})
.catch(err => {
console.error('Bridge not reachable', err);
});
Trezor Bridge is a local background application that enables secure transport between hardware wallets and browser-based applications without exposing private keys.
Bridge provides cross-browser compatibility, a stable local transport layer, and a consistent developer API without relying on browser extensions.
Bridge listens on a loopback port; web applications connect locally and request device actions which require user confirmation on the device itself.
Use the local HTTP endpoints or SDK wrappers to detect devices, send commands, and listen for approval callbacks from the user's Trezor.
Aspect | Bridge | Browser extension |
---|---|---|
Installation | Desktop installer — one-time | Install from browser store — per browser |
Security surface | Local host only, minimal persisted data | Runs inside browser process — larger attack surface |
Browser support | All modern browsers (via loopback) | Depends on extension APIs and browser vendor |
Update path | Centralized auto-update option | Managed through browser extension stores |
Use case | Best for hardware wallets and general web app compatibility | Good for lightweight in-browser wallets without hardware |
This section provides examples, UX patterns, API endpoints, and security guidance. Use these as a baseline and adapt to your application's needs.
async function getDevices() {
try {
const res = await fetch('http://127.0.0.1:21325/api/device/list', {cache: "no-store"});
if (!res.ok) throw new Error('Bridge not reachable');
return await res.json();
} catch (err) {
console.error('Bridge error', err);
throw err;
}
}
When requesting a hardware action, present a modal that explains the action, expected device prompts, and fallback steps. Use clear concrete verbs like “Confirm on your Trezor” rather than vague technical language.
fetch('http://127.0.0.1:21325/api/device/abc123/sign', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({message: '0xdeadbeef'})
})
.then(r => r.json())
.then(res => console.log('signature', res))
.catch(err => console.error('sign error', err));
Ensure Bridge is running and has permission on your OS. Try toggling USB connection, use a different cable, and check browser console for CORS or network errors. On Windows, inspect Device Manager for missing drivers.
Modern browsers sometimes block loopback connections due to security settings. Ensure you have not blocked 127.0.0.1 and that any corporate proxy/firewall rules permit local connections.
If automatic updates are enabled, Bridge will prompt to restart or install updates. For managed environments, distribute approved packages via your standard software management tools.
Bridge avoids storing private keys and minimizes telemetry. Review the project's privacy policy and source code if you need to confirm specific behaviors for compliance purposes.